/* 
 HP203B Pressure & Temperature Sensor Library
 By: Andrew Shelestov
 Date: April 19th, 2017
 License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).
 
 Get pressure and temperature from the HP203 sensor.
 */

#include <Wire.h>
#include "HP203B.h"

//Create an instance of the object
HP203B myHP203;

void setup() {
  Serial.begin(115200);
  Serial.println("HP203B Example!");

  myHP203.begin();

}

void loop() {
    Serial.print(" Temperature:");
    Serial.print(myHP203.readTemperature(), 1);
    Serial.print("C");
    Serial.print(" \tpressure:");
    Serial.print(myHP203.readPressure(), 1);
    Serial.print(" hPA");
    Serial.print(" \taltitude:");
    Serial.print(myHP203.readAltitude(), 1);
    Serial.print(" m");
    Serial.println();
  delay(1000);
}
